Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fixes search_deployment template to fix doc structure #1943

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

oarbusi
Copy link
Collaborator

@oarbusi oarbusi commented Feb 14, 2024

Description

Terraform registry docs for mongodbatlas are displayed with a wrong structure since v1.15.0 was released. The issue can be seen in the following image:

Screenshot 2024-02-14 at 12 16 42

Link to any related issue(s):

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contribution guidelines
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • If changes include deprecations or removals, I defined an isolated PR with a relevant title as it will be used in the auto-generated changelog.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@oarbusi oarbusi changed the title chore: fix search_deployment template to fix doc structure chore: Fixes search_deployment template to fix doc structure Feb 14, 2024
@github-actions github-actions bot added the bug label Feb 14, 2024
@oarbusi oarbusi removed the bug label Feb 14, 2024
@oarbusi oarbusi marked this pull request as ready for review February 14, 2024 11:22
@oarbusi oarbusi requested a review from a team as a code owner February 14, 2024 11:22
@github-actions github-actions bot added the bug label Feb 14, 2024
@oarbusi
Copy link
Collaborator Author

oarbusi commented Feb 14, 2024

Subcategories were not used in any resource before using it in this resource. Changing it back to avoid wrong docs structure issues.

Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small comment. Great catch 💯

@@ -1,7 +1,7 @@
---
layout: "mongodbatlas"
page_title: "MongoDB Atlas: {{.Name}}"
subcategory: "docs_{{ .Name }}_{{.Type | lower}}"
sidebar_current: "docs-{{ .ProviderShortName }}-{{ .Type | lower }}-{{ $name := split .Name "_" }}{{ index $name 1 }}-{{ index $name 2 }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I updated the 2 templates. I also changed a bit how it works so it's more generic and would work for all resources even if the resource name has a different amount of words than search_deployment

Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for all the changes here

@lantoli
Copy link
Member

lantoli commented Feb 14, 2024

I don't know if the link in make website can help to preview the changes here: https://registry.terraform.io/tools/doc-preview

@andreaangiolillo
Copy link
Collaborator

I don't know if the link in make website can help to preview the changes here: https://registry.terraform.io/tools/doc-preview

Thanks for sharing the link! I am adding it to our CONTRIBUTING.md in #1945

@oarbusi
Copy link
Collaborator Author

oarbusi commented Feb 14, 2024

I don't know if the link in make website can help to preview the changes here: https://registry.terraform.io/tools/doc-preview

@lantoli tried it but it doesn't allow to preview the structure of all the docs, which in this case was the issue

@oarbusi oarbusi merged commit 090a04e into master Feb 14, 2024
44 checks passed
@oarbusi oarbusi deleted the fix-terraform-docs branch February 14, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants